Skip to content

ci: Make Windows Defender step best-effort on Windows runners#103

Merged
andrew merged 1 commit into
git-pkgs:mainfrom
abhinavgautam01:ci-windows-defender-fix
Jun 29, 2026
Merged

ci: Make Windows Defender step best-effort on Windows runners#103
andrew merged 1 commit into
git-pkgs:mainfrom
abhinavgautam01:ci-windows-defender-fix

Conversation

@abhinavgautam01

Copy link
Copy Markdown
Contributor

Description

This PR updates .github/workflows/ci.yml to make the step that disables Windows Defender real-time monitoring a "best-effort" operation.

Previously, if Set-MpPreference failed (due to runner permission restrictions, environment updates, or transient issues), it would cause the entire CI pipeline to fail on Windows. By wrapping this command in a PowerShell try/catch block, we ensure that any failures simply emit a warning rather than hard-crashing and interrupting the subsequent build and test steps.

Note: This change was originally included as part of #96, but was extracted into this standalone PR as requested here #96 (review).

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting this out. -ErrorAction Stop + try/catch is the right shape so non-terminating errors actually hit the catch.

@andrew andrew merged commit 4e2a609 into git-pkgs:main Jun 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants